<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户评论：${title} </title>
<link href="/static/base.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript">
function doit(){
	parent.document.getElementById("gbook").innerHTML=document.getElementById("gbooks").innerHTML;
}
</script>
</head>
<body onload="doit()">
<div id="gbooks"> 
<!-- comment floor,username,date,content-->
% for cmt in cmts:
  <li>
  <p class="poster">
    <span class="cDRed">${cmt[0]}楼</span>&nbsp;&nbsp;
    <a href="/user/${cmt[4]}">${cmt[1]}</a>&nbsp;@&nbsp;${cmt[2]}&nbsp;&nbsp;说：
  </p>
  <p class='post'>${cmt[3]|n}</p>
  </li>
% endfor

<!-- nav pages -->
<div class="f_right">
% if curpage ==1:
  首页
% else:
  <a href="/comment/${id}/1" target='igbook'>首页</a>
% endif
% for p in pages:
  % if curpage == p:
    ${p}
  % else:
    <a href='/comment/${id}/${p}' target='igbook'>[${p}]</a>
  % endif
% endfor
% if curpage == lastpage:
  末页
% else:
  <a href="/comment/${id}/${lastpage}" target='igbook'>末页</a>
% endif
</div>

<!-- post comment -->
<div id="form">
  <form action="/comment/${id}" method="post" name="feedback" target="igbook">
    <input type="hidden" name="id" value="${id}" />
    % if nickname == '游客'.decode('utf-8'):
      <b>昵称:</b><span class="cDRed">${nickname}</span> (发表你对本作的看法) 
      <a href="/register/">注册</a>
      <a href="/login/">登录</a>
      <br />
    % else:
      <b>昵称:</b><span class="cDRed">${nickname}</span> (发表你对本作的看法)<br />
    % endif
    <b>评论:</b>请自觉遵守互联网相关政策法规,评论不得超过250字.<br />
    <textarea name="msg" id="msg" cols="50" rows="8" wrap="VIRTUAL"></textarea><br />
    <input type='button' value='发表评论' name='sb' onClick='javascript:if(document.feedback.msg.value!="") document.feedback.submit(); else alert("评论内容不能为空！");' style='width:60;height:20'>
  </form>
</div>

</div>
</body>
</html>


